# CMake file to generate domain specific make/project files.
# Copyright Emre Turkay 2009
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file COPYRIGHT or copy at
# http://www.boost.org/LICENSE_1_0.txt

CMAKE_MINIMUM_REQUIRED(VERSION 2.6)

PROJECT(gtdshell)

FIND_PACKAGE(Boost REQUIRED COMPONENTS signals)
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR})

ADD_DEFINITIONS(-Wall -Wextra)

SET(GTDSHELL_SRCS
    application.cpp
    application.hpp
    configuration.hpp
    done.hpp
    done.ipp
    gtd.cpp
    gtd.hpp
    interface.cpp
    interface.hpp
    line_parser.hpp
    line_parser.ipp
    main.cpp
    projects.hpp
    projects.ipp
    rl.cpp
    rl.hpp
    unique_id_container.hpp
)

SET(DOCS
    ${CMAKE_SOURCE_DIR}/COPYING
    ${CMAKE_SOURCE_DIR}/NEWS
    ${CMAKE_SOURCE_DIR}/README
)

ADD_EXECUTABLE(gtdshell ${GTDSHELL_SRCS})

TARGET_LINK_LIBRARIES(gtdshell readline)

INSTALL(FILES ${DOCS} DESTINATION share/gtdshell)
INSTALL(TARGETS gtdshell RUNTIME DESTINATION bin)

SET(CPACK_GENERATOR "TBZ2;DEB")
SET(CPACK_PACKAGE_NAME "gtdshell")
SET(CPACK_PACKAGE_VERSION "0.3.0")
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Console based GTD tool")
SET(CPACK_PACKAGE_VENDOR "Emre Turkay")
SET(CPACK_PACKAGE_CONTACT "Emre Turkay")
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README")
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
SET(CPACK_STRIP_FILES "gtdshell")
SET(CPACK_SOURCE_STRIP_FILES "")
SET(CPACK_PACKAGING_INSTALL_PREFIX "/usr")
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libreadline5,libboost-signals1.35.0")
SET(CPACK_DEBIAN_PACKAGE_SECTION "misc")
include(CPack)

